package BeenChina.PM.Service.Impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

 
import BeenChina.PM.DAO.CommonInfoDao;
import BeenChina.PM.Model.ModelCaseInfo;
import BeenChina.PM.Service.CommonInfoService;

public class CommonInfoServiceImpl implements CommonInfoService{

	
	 private CommonInfoDao dao;

	    public CommonInfoDao getDao() {
	        return dao;
	    }

	    public void setDao(CommonInfoDao dao) {
	        this.dao = dao;
	    }
	    
	 public List<ModelCaseInfo> selectCaseNames(){   
	    	try{			  
				return this.dao.selectCaseNames();
			} 
			catch (Exception e) {  
	             e.printStackTrace();  
	             return null;
	         }
	    }

	@Override
	public void insertActionLog(String userId, String actionName, String actionInfo,String accessIP,String actionParams) {
		try{			 
			Map<String, String> params = new HashMap<String, String>();
		
			params.put("userId", userId);
			params.put("actionName", actionName); 
			params.put("actionInfo", actionInfo);
			params.put("accessIP", accessIP);
			params.put("actionParams",actionParams);
			
			this.dao.insertActionLog(params);
		 } catch (Exception e) {  
             e.printStackTrace();
         }  
		
	}
	 
}
